<script>
// 顶部tab+页面切换
import { defineComponent } from 'vue'
export default defineComponent({
	name: 'WeworkQr'
})
</script>
<script setup>
import { ref } from 'vue'
import { toRaw } from '@vue/reactivity'
import Pic from './pic.vue'
import Material from './material.vue'
import Video from './video.vue'
import { useRouter } from 'vue-router'


const dialogVisible = ref(false)
const module = ref('Pic')
const router = useRouter();
if (router.currentRoute.value.query){
	if(router.currentRoute.value.query.type==4) module.value = 'MaterialVideo'
}
const editQr = ref(null)
const showEdit = (val) => {
	if (val) {
		editQr.value.show(toRaw(val).id)
	}
	dialogVisible.value = true
}
</script>
<template>
	<div class="back-deep">
		<div v-if="!dialogVisible">
			<div class="app-tab app-tab-margin-top">
				<div @click="module = 'Pic'" :class="module == 'Pic' ? 'app-tab-item-active' : 'app-tab-item'">图片</div>
				<div @click="module = 'Video'" :class="module == 'Video' ? 'app-tab-item-active' : 'app-tab-item'">视频</div>
				<!-- <div @click="module = 'Voice'" :class="module == 'Voice' ? 'app-tab-item-active' : 'app-tab-item'">音频</div>
				<div @click="module = 'MaterialVideo'" :class="module == 'MaterialVideo' ? 'app-tab-item-active' : 'app-tab-item'">混剪</div> -->
			</div>
			<Material v-if="module == 'Pic'" />
			<Material :type="2" v-else-if="module == 'Video'" />
			<!-- <Material :type="3" v-else-if="module == 'Voice'" />
			<Material :type="4" v-else /> -->
		</div>
	</div>
</template>
<style lang="scss">
@import url('../../../style/app-component.scss');
@import '../../../style/mixin.scss';
</style>
